package com.example.yiwei.crm.dao_impl;

import com.example.yiwei.crm.dao.customerDao;
import com.example.yiwei.crm.entity.ApointmentEntity;
import com.example.yiwei.crm.entity.CommunicateLogEntity;
import com.example.yiwei.crm.entity.ContactMessageEntity;
import com.example.yiwei.crm.entity.CustomerMessageEntity;
import com.example.yiwei.crm.json.contactJson;
import com.example.yiwei.crm.json.customerJson;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2016/12/7.
 */

public class customerDaoImpl implements customerDao {
    @Override
    public List<CustomerMessageEntity> querySimpleCustomerMessage(String url,String paramter) {
        List<CustomerMessageEntity> customer= customerJson.jsonCustomerSimpleMessage(url,null);
        return customer;
    }

    public List<Map<String, String>> querySpinnerContent(String result, int l) {
        List<Map<String,String>> list=customerJson.jsonCustomerSpinnerContent(result,l);
        return list;
    }

    @Override
    public List<ContactMessageEntity> queryContactAllMessage(String aurl, String apara) {
        List<ContactMessageEntity> contact= contactJson.ContactAllMessageJson(aurl,null);
        return contact;
    }

    @Override
    public ContactMessageEntity queryContactMessage(String durl, String dpara) {
        ContactMessageEntity contact=contactJson.detailedContactMessageJson(durl,dpara);
        return contact;
    }

    @Override
    public List<Map<String, String>> queryAppointmentSpinner(String result, int l) {
        List<Map<String,String>> list=customerJson.jsonAppointmentSpinner(result,l);
        return list;

    }

    @Override
    public List<ApointmentEntity> querySimpleAppointmentMessage(String url, String para) {
        List<ApointmentEntity> apointmentEntityList=customerJson.jsonCustomerAppointmentSimpleMessage(url,para);
        return apointmentEntityList;
    }

    @Override
    public ApointmentEntity queryDetailedAppointmentMessage(String URL, String PARA) {
        ApointmentEntity apointmentEntity=customerJson.jsonCustomerAppointmentDetailedMessage(URL,PARA);
            return apointmentEntity;
    }

    @Override
    public List<ApointmentEntity> queryTriageMessage(String URL, String PARA) {
        List<ApointmentEntity> apointmentEntityList=customerJson.jsonTriageMessage(URL,PARA);
        return apointmentEntityList;
    }

    @Override
    public ApointmentEntity queryAllTriageMessage(String url, String para) {
        ApointmentEntity apointmentEntity=customerJson.jsonAllTriageMessage(url,para);
        return apointmentEntity;
    }

    @Override
    public List<CustomerMessageEntity> querySimpleReceiveCustomerMessage(String url, String para) {
        List<CustomerMessageEntity> list=customerJson.jsonSimpleReceiveCustomerMessage(url,para);
        return list;
    }

    @Override
    public CustomerMessageEntity queryDetailedReceiveCustomerMessage(String url, String para) {
        CustomerMessageEntity customerMessageEntity=customerJson.jsonDetailedReceiveCustomerMessage(url,para);
        return customerMessageEntity;
    }

    @Override
    public List<CommunicateLogEntity> queryAllCommunicateLogMessage(String url, String para) {
        List<CommunicateLogEntity> list=customerJson.jsonCommunicateLog(url,para);
        return list;
    }

    @Override
    public List<CustomerMessageEntity> queryMineAllCustomerMessage(String url, String para) {
        List<CustomerMessageEntity>list=customerJson.queryMineAllCustomer(url, para);
        return list;
    }

    @Override
    public CustomerMessageEntity queryDetailedCustomerMessage(String surl,String paramter) {
        CustomerMessageEntity customer=customerJson.jsonCustomerDetailedMessage(surl,paramter);
        return customer;
    }
}
